/*****************************************************
** Author: 
** Date: 2021-05-01
*
*****************************************************/

#ifndef __SMARTCAR_PROTOCOL_H_
#define __SMARTCAR_PROTOCOL_H_

#ifdef __cplusplus
extern "C"{
#endif

enum {
    CTRL_CAR_FORWARD,
    CTRL_CAR_BACKWARD,
    CTRL_CAR_LEFT,
    CTRL_CAR_RIGHT,
    CTRL_CAMERA_UP,
    CTRL_CAMERA_DOWN,
    CTRL_CAMERA_LEFT,
    CTRL_CAMERA_RIGHT,
    CTRL_EXIT,
    CTRL_INVALID,
};

int CreateMsgHeader(unsigned short ctrltype, unsigned short bodysize, 
                    unsigned char *output, int maxsize);
int CreateCtrlMsg(int ctrl, unsigned char *output, int maxsize);

#ifdef __cplusplus
}
#endif

#endif /* __SMARTCAR_PROTOCOL_H_ */

